package great.project;

import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

import java.util.Arrays;

/**
 * @author v_zhangshun01
 */
@SpringBootApplication
public class ValueApp implements InitializingBean {


    @Value("${profile.name:none}")
    private String profileName;

    @Value("${list.o1:}")
    private String[] list01;

    public static void main(String[] args) {
        SpringApplication.run(ValueApp.class, args);
    }

    @Override
    public void afterPropertiesSet() throws Exception {
        System.out.println("profile:" + profileName);
        System.out.println("list01:" + Arrays.toString(list01));
    }
}
